package com.metaera.app.data.model;

import java.util.Objects;

public class HistoryListResponse {

    private Integer     id;
    private Integer     user_id;
    private Integer     information_id;
    private String      create_time;
    private Integer     is_delete;
    private Information information;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getUser_id() {
        return user_id;
    }

    public void setUser_id(Integer user_id) {
        this.user_id = user_id;
    }

    public Integer getInformation_id() {
        return information_id;
    }

    public void setInformation_id(Integer information_id) {
        this.information_id = information_id;
    }

    public String getCreate_time() {
        return create_time;
    }

    public void setCreate_time(String create_time) {
        this.create_time = create_time;
    }

    public Integer getIs_delete() {
        return is_delete;
    }

    public void setIs_delete(Integer is_delete) {
        this.is_delete = is_delete;
    }

    public Information getInformation() {
        return information;
    }

    public void setInformation(Information information) {
        this.information = information;
    }

    public static class Information {
        private Integer id;
        private Integer type;
        private String  title;
        private String  pic;
        private String  create_date;
        private Integer author_id;
        private Integer release_time_stamp;
        private Author  author;

        public Integer getId() {
            return id;
        }

        public void setId(Integer id) {
            this.id = id;
        }

        public Integer getType() {
            return type;
        }

        public void setType(Integer type) {
            this.type = type;
        }

        public String getTitle() {
            return title;
        }

        public void setTitle(String title) {
            this.title = title;
        }

        public String getPic() {
            return pic;
        }

        public void setPic(String pic) {
            this.pic = pic;
        }

        public String getCreate_date() {
            return create_date;
        }

        public void setCreate_date(String create_date) {
            this.create_date = create_date;
        }

        public Integer getAuthor_id() {
            return author_id;
        }

        public void setAuthor_id(Integer author_id) {
            this.author_id = author_id;
        }

        public Integer getRelease_time_stamp() {
            return release_time_stamp;
        }

        public void setRelease_time_stamp(Integer release_time_stamp) {
            this.release_time_stamp = release_time_stamp;
        }

        public Author getAuthor() {
            if(author == null){
                return new Author();
            }
            return author;
        }

        public void setAuthor(Author author) {
            this.author = author;
        }

        public static class Author {
            private Integer id;
            private String  mobile;
            private String  nickname;
            private Object  avatar_img;

            public Integer getId() {
                return id;
            }

            public void setId(Integer id) {
                this.id = id;
            }

            public String getMobile() {
                return mobile;
            }

            public void setMobile(String mobile) {
                this.mobile = mobile;
            }

            public String getNickname() {
                return Objects.requireNonNullElse(nickname, "null");
            }

            public void setNickname(String nickname) {
                this.nickname = nickname;
            }

            public Object getAvatar_img() {
                return avatar_img;
            }

            public void setAvatar_img(Object avatar_img) {
                this.avatar_img = avatar_img;
            }
        }

    }
}
